<template>
    <div>
        <h2>CallBack</h2>
    </div>
</template>

<script setup>
import {ref,onMounted} from "vue"
import {ElMessage} from 'element-plus'
import axios from 'axios'
import {useRouter} from 'vue-router'
import {useRoute} from 'vue-router'
import http from "../http"; 

const router = useRouter()
const route = useRoute()

const code = route.query.code

const ddcallback=()=>{
  http.post("/back/?code="+code).then(res=>{
    router.push('/')
  })
}

onMounted(()=>{
  ddcallback()
})
</script>